from django.contrib import admin
from django.urls import path
from django.conf import settings
# from django.shortcuts import HttpResponse
from patient import views as patient_views
from django.conf.urls.static import static
from doctor import views as doctor_views
from patient import views as patient_views
from medical_record import views as medical_record_views
from apply import views as apply_views
from appointment import views as appointment_views
from medicine import views as medicine_views
from medicine_use import views as medicine_use_views
from prescription import views as prescription_views
from pay_clinic import views as pay_clinic_views
urlpatterns = [
    path("admin/", admin.site.urls),
    path('patient/register', patient_views.AccountRegister.as_view()),
    path('patient/login', patient_views.AccountLogin.as_view()),
    path('patient/profilephone_upload', patient_views.AccountProfilePhoto.as_view()),
    path('patient/get_user_info', patient_views.GetUserInfo.as_view()),
    path('patient/patient_update_info', patient_views.PatientUpdate.as_view()),

    path('medical_record/patient_all', medical_record_views.Get_All.as_view()),
    path('medical_record/target', medical_record_views.Get_Target.as_view()),
    path('medical_record/create', medical_record_views.Create.as_view()),
    path('medical_record/change', medical_record_views.Change.as_view()),
    path('medical_record/done', medical_record_views.Done.as_view()),

    path('medicine_use/all', medicine_use_views.Get_All.as_view()),
    path('medicine_use/target', medicine_use_views.Get_Target.as_view()),
    path('medicine_use/target_all', medicine_use_views.Get_All_Target.as_view()),
    path('medicine_use/create', medicine_use_views.Create.as_view()),
    path('medicine_use/change', medicine_use_views.Change.as_view()),
    path('medicine_use/delete', medicine_use_views.Delete.as_view()),

    path('prescription/all', prescription_views.Get_All.as_view()),
    path('prescription/all_paid', prescription_views.Get_All_All.as_view()),
    path('prescription/target', prescription_views.Get_Target.as_view()),
    path('prescription/create', prescription_views.Create.as_view()),
    path('prescription/change', prescription_views.Change.as_view()),
    path('prescription/done', prescription_views.Done.as_view()),


    path('medicine/all', medicine_views.Get_All.as_view()),
    # path('medicine/target', medicine_views.Get_Target.as_view()),
    path('medicine/create', medicine_views.Create.as_view()),
    # path('medicine/change', medicine_views.Change.as_view()),
    # path('medicine/done', medicine_views.Done.as_view()),
    path('medicine/take', medicine_use_views.Take_medicine.as_view()),
    path('medicine/refund', medicine_use_views.Refund_medicine.as_view()),

    path('apply/apply_all', apply_views.Get_All.as_view()),
    path('apply/target', apply_views.Get_Target.as_view()),
    path('apply/create', apply_views.Create.as_view()),
    path('apply/change', apply_views.Change.as_view()),
    path('apply/done', apply_views.Done.as_view()),

    # path('patient/<int:user_id>', patient_views.user_search),
    path('doctor/register', doctor_views.DoctorAccountRegister.as_view()),
    path('doctor/login', doctor_views.DoctorAccountLogin.as_view()),
    # path('doctor/<int:doctor_id>', doctor_views.doctor_search),
    # path('doctor/all', doctor_views.doctor_search_all),
    path('doctor/getdoctorinfo', doctor_views.GetDoctorInfo.as_view()),
    path('doctor/target', doctor_views.Get_Target.as_view()),
    path('doctor/call', appointment_views.DoctorCall.as_view()),
    path('doctor/doctor_update_info', doctor_views.DoctorUpdate.as_view()),
    path('doctor/profilephoto_upload', doctor_views.DoctorProfilePhoto.as_view()),

    path('appiontment/createonline', appointment_views.OnlineAppointment.as_view()),
    # path('appiontment/createoffline', appointment_views.OfflineAppointment.as_view()),
    path('appiontment/onlinepayment', appointment_views.OnlinePayment.as_view()),
    path('appiontment/queuestatus', appointment_views.QueueStatus.as_view()),
    path('appiontment/availableslots', appointment_views.AvailableSlots.as_view()),

    path('appiontment/myappointments', appointment_views.MyAppointment.as_view()),
    path('appiontment/get_current_patient', appointment_views.GetCurrentPatient.as_view()),
    # path('appiontment/availableslots', appointment_views.AvailableSlots.as_view()),

    path('payclinic/paylist', pay_clinic_views.PayList.as_view()),
    path('payclinic/get_medical_record', pay_clinic_views.ReturnMRbyAppointment.as_view()),
    path('payclinic/get_apply', pay_clinic_views.ReturnApplybyAppointment.as_view()),
    path('payclinic/pay_apply', pay_clinic_views.PayApply.as_view()),
    path('payclinic/get_medicaluse', pay_clinic_views.ReturnMedicalUsebyAppointment.as_view()),
    path('payclinic/pay_medicine', pay_clinic_views.PayMedicine.as_view()),
    path('payclinic/refund_apply', pay_clinic_views.RefundApply.as_view()),
    path('payclinic/refund_medicine', pay_clinic_views.RefundMedicineUse.as_view()),
]


if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    # urlpatterns += static(settings.STATIC_URL, document_root=settings.STATICFILES_DIRS[0])